package com.neuedu.wemall.member.controller;

import com.neuedu.wemall.common.vo.ResponseData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import com.neuedu.wemall.dao.entity.Category;
import com.neuedu.wemall.service.ICategoryService;

/**
* Author lu
* Date   2025-09-08 15:17:25
*/
@Log4j2
@RequestMapping("/wemall/product/category/api")
@RestController
@Tag(name = "商品分类控制器")
public class CategoryController  {

    @Autowired
    @Qualifier("categoryService")
    private ICategoryService categoryService;

    /**
     * 获取分类列表
     * @return
     */
    @Operation(summary = "获取分类列表")
    @GetMapping("list")
    public ResponseData  getCategoryList() {
        return ResponseData.success(categoryService.getCategoryList());
    }
}